/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.minam.beans;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Alvaro
 */
@Embeddable
public class ScamvdCalidadAirePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ESTA")
    private BigInteger idEsta;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_VAR")
    private BigInteger idVar;
    @Basic(optional = false)
    @NotNull
    @Column(name = "D_FECHA_REG")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dFechaReg;

    public ScamvdCalidadAirePK() {
    }

    public ScamvdCalidadAirePK(BigInteger idEsta, BigInteger idVar, Date dFechaReg) {
        this.idEsta = idEsta;
        this.idVar = idVar;
        this.dFechaReg = dFechaReg;
    }

    public BigInteger getIdEsta() {
        return idEsta;
    }

    public void setIdEsta(BigInteger idEsta) {
        this.idEsta = idEsta;
    }

    public BigInteger getIdVar() {
        return idVar;
    }

    public void setIdVar(BigInteger idVar) {
        this.idVar = idVar;
    }

    public Date getDFechaReg() {
        return dFechaReg;
    }

    public void setDFechaReg(Date dFechaReg) {
        this.dFechaReg = dFechaReg;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEsta != null ? idEsta.hashCode() : 0);
        hash += (idVar != null ? idVar.hashCode() : 0);
        hash += (dFechaReg != null ? dFechaReg.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ScamvdCalidadAirePK)) {
            return false;
        }
        ScamvdCalidadAirePK other = (ScamvdCalidadAirePK) object;
        if ((this.idEsta == null && other.idEsta != null) || (this.idEsta != null && !this.idEsta.equals(other.idEsta))) {
            return false;
        }
        if ((this.idVar == null && other.idVar != null) || (this.idVar != null && !this.idVar.equals(other.idVar))) {
            return false;
        }
        if ((this.dFechaReg == null && other.dFechaReg != null) || (this.dFechaReg != null && !this.dFechaReg.equals(other.dFechaReg))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.com.minam.beans.ScamvdCalidadAirePK[ idEsta=" + idEsta + ", idVar=" + idVar + ", dFechaReg=" + dFechaReg + " ]";
    }
    
}
